"registry 0.0.1-pre",
"semver 0.1.0 (git+https://github.com/rust-lang/semver)",
"tar 0.0.1 (git+https://github.com/alexcrichton/tar-rs)",
+ "time 0.0.1 (git+https://github.com/rust-lang/time)",
"toml 0.1.0 (git+https://github.com/alexcrichton/toml-rs)",
"url 0.1.0 (git+https://github.com/servo/rust-url)",
]
[[package]]
name = "git2"
version = "0.0.1"
-source = "git+https://github.com/alexcrichton/git2-rs#847a4902f3e0971c394ac3f35995e49a774b275a"
+source = "git+https://github.com/alexcrichton/git2-rs#afec995029fae2d1eedf4d635b2131080b5b196d"
dependencies = [
"libgit2-sys 0.0.1 (git+https://github.com/alexcrichton/git2-rs)",
+ "time 0.0.1 (git+https://github.com/rust-lang/time)",
"url 0.1.0 (git+https://github.com/servo/rust-url)",
]
[[package]]
name = "libgit2-sys"
version = "0.0.1"
-source = "git+https://github.com/alexcrichton/git2-rs#847a4902f3e0971c394ac3f35995e49a774b275a"
+source = "git+https://github.com/alexcrichton/git2-rs#afec995029fae2d1eedf4d635b2131080b5b196d"
dependencies = [
"libssh2-sys 0.0.1 (git+https://github.com/alexcrichton/ssh2-rs)",
"openssl-sys 0.0.1 (git+https://github.com/alexcrichton/openssl-sys)",
version = "0.0.1"
source = "git+https://github.com/alexcrichton/tar-rs#47d2cc4b09e373a4cc7bee7c71ebf96b42ea620d"
+[[package]]
+name = "time"
+version = "0.0.1"
+source = "git+https://github.com/rust-lang/time#76698f52381a78cf654dbedfefd04c28a9806788"
+dependencies = [
+ "gcc 0.0.1 (git+https://github.com/alexcrichton/gcc-rs)",
+]
+
[[package]]
name = "toml"
version = "0.1.0"
[dependencies.glob]
git = "https://github.com/rust-lang/glob"
+[dependencies.time]
+git = "https://github.com/rust-lang/time"
+
[dependencies.registry]
path = "src/registry"
Profile {
env: "compile".to_string(), // run in the default environment only
opt_level: 0,
- lto: false,
debug: true,
.. Profile::default()
}
Profile {
env: "bench".to_string(),
opt_level: 3,
- lto: false,
test: true,
dest: Some("release".to_string()),
.. Profile::default()
Profile {
env: "release".to_string(),
opt_level: 3,
- lto: false,
dest: Some("release".to_string()),
.. Profile::default()
}
if profile.get_opt_level() != 0 {
cmd = cmd.arg("--opt-level").arg(profile.get_opt_level().to_string());
}
- if target.is_bin() && profile.get_lto() {
+ if (target.is_bin() || target.is_staticlib()) && profile.get_lto() {
cmd = cmd.args(["-C", "lto"]);
} else {
- // @alexchrichton says that there may be some restrictions with LTO
- // and codegen-units, so that we should only add codegen units when
- // LTO is not used.
+ // There are some restrictions with LTO and codegen-units, so we
+ // only add codegen units when LTO is not used.
match profile.get_codegen_units() {
Some(n) => cmd = cmd.arg("-C").arg(format!("codegen-units={}", n)),
None => {},
opt-level = 0 # Controls the --opt-level the compiler builds with
debug = true # Controls whether the compiler passes -g or `--cfg ndebug`
rpath = false # Controls whether the compiler passes `-C rpath`
+lto = false # Controls `-C lto` for binaries and staticlibs
# The release profile, used for `cargo build --release`
[profile.release]
opt-level = 3
debug = false
rpath = false
+lto = false
# The testing profile, used for `cargo test`
[profile.test]
opt-level = 0
debug = true
rpath = false
+lto = false
# The benchmarking profile, used for `cargo bench`
[profile.bench]
opt-level = 3
debug = false
rpath = false
+lto = false
# The documentation profile, used for `cargo doc`
[profile.doc]
opt-level = 0
debug = true
rpath = false
+lto = false
```
# The `[features]` Section
# The "default" set of optional packages. Most people will
# want to use these packages, but they are strictly optional
-default = ["jquery", "uglifier"]
+default = ["jquery", "uglifier", "session"]
# The "secure-password" feature depends on the bcrypt package.
# This aliasing will allow people to talk about the feature in
name = "test"
version = "0.0.0"
authors = []
+
+ [profile.release]
lto = true
"#)
.file("src/main.rs", "fn main() {}");
- assert_that(p.cargo_process("build").arg("-v"),
+ assert_that(p.cargo_process("build").arg("-v").arg("--release"),
execs().with_status(0).with_stdout(format!("\
{compiling} test v0.0.0 ({url})
-{running} `rustc {dir}{sep}src{sep}lib.rs --crate-name test --crate-type bin -g \
+{running} `rustc {dir}{sep}src{sep}main.rs --crate-name test --crate-type bin \
+ --opt-level 3 \
-C lto \
- -C metadata=[..] \
- -C extra-filename=-[..] \
- --out-dir {dir}{sep}target \
+ --cfg ndebug \
+ --out-dir {dir}{sep}target{sep}release \
--dep-info [..] \
- -L {dir}{sep}target \
- -L {dir}{sep}target{sep}deps`
+ -L {dir}{sep}target{sep}release \
+ -L {dir}{sep}target{sep}release{sep}deps`
",
running = RUNNING, compiling = COMPILING, sep = path::SEP,
dir = p.root().display(),